package extends_abstract.abstracthome;

import java.util.ArrayList;

public class boss extends user {

    public boss(String name,double num)
    {
        super(name,num);
    }

    public  ArrayList<Double> send(double money,int mannum)
    {
        ArrayList<Double> arraymoney = new ArrayList<>();
        double leftmoney=super.getNum();
        if(leftmoney<money){
            System.out.println("余额不足，请充值");
        }
        else {
            double num = money / mannum;
            for (int i = 0; i < mannum; i++) {
                arraymoney.add(num);
            }
            super.setNum(leftmoney-money);
        }
       return arraymoney;
    }

    public void balance()
    {
        System.out.println(getName()+"余额有"+getNum());
    }
}
